import java.io.File;
import java.io.FileFilter;

/**
 *@author aa
 */
public class RenameFiles {
	public static void main(String[] args) {
		File file = new File("F:\\Program Files\\Tencent\\QQ\\Users\\455124655\\Image");
		File[] fs = file.listFiles();
		for (int i = 0; i < fs.length; i++) {
			if(fs[i].isFile()) {
				String name = fs[i].getName();
				int idx = name.lastIndexOf(".");
				if(idx <=-1) {
					continue;
				} else {
					name = name.substring(idx);
					fs[i].renameTo(
							new File("F:\\Program Files\\Tencent\\QQ\\Users\\455124655\\Image\\"
									+i+ name));
				}
			}
		}
	}
}
